﻿using MediatR;
using Traceability.API.Dtos;
using Traceability.ErrorCode;

namespace Traceability.API.APPLications.Commands.Login
{
    /// <summary>
    /// 用户登录查询命令
    /// </summary>
    /// <remarks>
    /// 用于处理用户登录请求的命令对象，包含用户名和密码信息
    /// </remarks>
    public class LoginQueryCommand : IRequest<APIResult<LoginResponseDto>>
    {
        /// <summary>
        /// 用户名
        /// </summary>
        /// <remarks>
        /// 用户的登录用户名，不能为空
        /// </remarks>
        /// <example>admin</example>
        public string UserName { get; set; }
        
        /// <summary>
        /// 用户密码
        /// </summary>
        /// <remarks>
        /// 用户的登录密码，系统会自动进行MD5加密验证
        /// </remarks>
        /// <example>123456</example>
        public string Password { get; set; }

        /// <summary>
        /// 验证码ID
        /// </summary>
        /// <remarks>
        /// 验证码唯一标识，用于查找对应的验证码
        /// </remarks>
        /// <example>captcha_123456789</example>
        public string CaptchaId { get; set; }
        
        /// <summary>
        /// 验证码
        /// </summary>
        /// <remarks>
        /// 用户输入的验证码，不区分大小写
        /// </remarks>
        /// <example>A1B2</example>
        public string CaptchaCode { get; set; }
    }
}
